#ifndef MEMBER_TYPE_H__
#define MEMBER_TYPE_H__

struct MemberType {
public:
	enum Type {
		INTEGER_T, STRING_T,
	};

	MemberType() : name_(0), flags_(0) {
	}

	// reference
	bool reference() const {
		return reference_;
	}
	void set_reference(bool reference) {
		reference_ = reference;
	}

	// id
	Type id() const {
		return id_;
	}
	void set_id(Type id) {
		id_ = id;
	}

	// name
	const char* name() const {
		return name_;
	}
	void set_name(const char* name) {
		name_ = name;
	}

private:
	Type id_;
	const char* name_;      // not owned

	// flags
	union {
		struct {
			unsigned reference_:1;
		};
		unsigned flags_;
	};
};

#endif
